<template>
	<div>

        评价晒单 
        <textarea  v-model="content">
        </textarea>

        <Button color='red' @click="submit">发表</Button>

	</div>
</template>


<script>

export default {

  data () {
    return {
        id:'',
        content:'',
    }
  },

  mounted:function(){
      var id = this.$route.query.id;
      this.id = id
  
},
  methods:{

  	submit(){

  		//发送请求
      this.axios.get('http://localhost:8000/comment/',{params:{uid:localStorage.getItem('uid'),gid:this.id},content:this.content}).then((result) =>{
            if(result.data.code==200){
                this.$Message('评论成功')
                this.$router.push({'path':'/order'});
            }
            else{
                this.$Message('评论失败')
            }
      });

  	},

     
  }
}
	


</script>


<style>
	


</style>